package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter@Getter
public class Employee {

    public static final int STATE_NORAML = 0;
    public static final int STATE_LOCK = 1;
    private Long id;

    private String userName;

    private String realName;

    private String password;

    private String tel;

    private String email;

    private Department dept;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime;

    private int state = Employee.STATE_NORAML;

    private boolean admin;

    List<Role> roles = new ArrayList<>();

}